package com.example.spring3.controller;

import com.example.spring3.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired
    StudentMapper studentMapper;
    @GetMapping(value = "/student/{id}")
    public Object getStudent(@PathVariable("id") String id) {
        return studentMapper.findStudentById(id);
    }


}
